package com.lagou.edu.dao;

import com.lagou.edu.pojo.LagouAuthCode;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * @Author grung
 * @Date 2020/10/24 15:31
 * @Version 1.0
 */


public interface CodeDao extends JpaRepository<LagouAuthCode,Long> {

    List<LagouAuthCode> findLagouAuthCodeByEmailOrderByExpiretimeDesc(String email);

    List<LagouAuthCode> findLagouAuthCodeByEmailAndCodeOrderByExpiretimeDesc(String email,String code);
}
